<?php
/* @var $this CoursetemplateController */
/* @var $model Coursetemplate */

$this->main_menu = MenuHelper::getArrayForMainMenu(false, false, false, true);

$this->widget('bootstrap.widgets.TbTabs', array(
	'type'=>'tabs', // 'tabs' or 'pills'
	'tabs'=>MenuHelper::getArrayForCoreDataMenu(),
	));
?>

<?php
    $this->widget('bootstrap.widgets.TbExtendedGridView', array(
    'filter'=>$model,
    'fixedHeader' => false,
    'headerOffset' => 40, // 40px is the height of the main navigation at bootstrap
    'type'=>'striped bordered',
    'dataProvider' => $model->search(),
    'template' => '{items}{pager}', // 2nd way
	'columns'=>array(
             'title',
            'category1',
            'category2',
            'type',
            'duration',
            'ue',
            'min_participants',
            'max_participants',
            'price',
            array(
                'class'=>'CButtonColumn',
                'template'=>'{update}{delete}',
                'buttons'=>array(
	            	'update'=>array(
	            		'imageUrl'=>Yii::app()->request->baseUrl.'/images/update.png',
	            	),
	            	'delete'=>array(
	            		'imageUrl'=>Yii::app()->request->baseUrl.'/images/delete.png',
	            	),
	            ),    
            ),
	),
    ));
?>

<div id="bottom">

<?php
$this->widget('bootstrap.widgets.TbButton',array(
    'label' => 'Kursvorlage hinzufügen',
    'size' => 'medium',
    'url' => array('/coursetemplate/create'),
));
?>

</div>